﻿<Page
    x:Class="Knihotoc_WinStore.Pages.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Knihotoc_WinStore.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid Grid.Row="0"
              Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock x:Name="pageTitleLabel" 
                   x:Uid="ApplicationTitle" 
                   Grid.Row="0"
                   Grid.Column="0"
                   HorizontalAlignment="Left"
                   IsHitTestVisible="False" 
                   Style="{StaticResource PageHeaderTextStyle}" />

            <Button x:Name="profileButton"
                    Grid.Row="0"
                    Grid.Column="1"
                    Height="80"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Margin="0,0,80,0"
                    Click="profileButton_Click_1"
                    Style="{StaticResource TextPrimaryButtonStyle}">
                <StackPanel Orientation="Horizontal">
                    <TextBlock x:Name="profileUserName"
                               Padding="10"
                               VerticalAlignment="Center"
                               Text="garfield" />
                    <Image x:Name="profileImage" 
                           Source="Images/profileImage_Test.jpg" />
                </StackPanel>
            </Button>
        </Grid>

        <GridView Grid.Row="1"
                  Grid.Column="1"
                  Grid.RowSpan="2"
                  Style="{StaticResource GridViewMainPage}"
                  ItemContainerStyle="{StaticResource GridViewMainPageItem}">
            <GridViewItem Style="{StaticResource GridViewMainPageItem}">
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Button Grid.Row="0"
                            Style="{StaticResource GridViewItemLabelButton}">
                        <TextBlock x:Name="gridViewBooksLabel" 
                                   x:Uid="booksLabel"
                                   Style="{StaticResource GridviewItemLabelTextStyle}"/>
                    </Button>
                    <VariableSizedWrapGrid x:Name="booksWrapGrid" 
                                           Grid.Row="1" 
                                           Orientation="Vertical">
                    </VariableSizedWrapGrid>
                </Grid>
            </GridViewItem>
        </GridView>
    </Grid>
</Page>